package org.seedltd.upms.model.detection.form;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.seedltd.core.validation.Save;
import org.seedltd.core.validation.Update;
import org.seedltd.upms.enums.EnableStatus;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 *
 * 终端管理表单
 * 
 * @author laizuan
 * @version 1.0
 * @since 2021/07/28
 */
@Getter
@Setter
public class DetectionTerminalForm {
    /**
     * 主键
     */
    @NotNull(message = "修改数据ID不能为空，请重新进入操作页面。", groups = {Update.class})
    private Long id;

    /**
     * 终端类型，1回收箱，0贩卖机
     */
    private Integer terminalType;

    /**
     * 终端所在位置
     */
    @Length(message = "终端所在位置长度不能超过255个字符", max = 255, groups = {Save.class})
    @NotBlank(message = "终端所在位置不能为空", groups = {Save.class})
    private String location;

    /**
     * 终端编号
     */
    @Length(message = "终端编号长度不能超过20个字符", max = 20, groups = {Save.class})
    @NotBlank(message = "终端编号不能为空", groups = {Save.class})
    private String serialNumber;

    /**
     * 售货机ID
     */
    private String machineId;

    /**
     * 启禁用
     */
    @NotNull(message = "启禁用不能为空", groups = {Save.class})
    private EnableStatus enabled;

    /**
     * 备注
     */
    @Length(message = "备注长度不能超过200个字符", max = 200, groups = {Save.class})
    private String remark;

}
